{% extends "master.html" %}
{% block subtitle %} - 主面板 - 调拨管理{% endblock %}

{% block main %}
<div class="container">
    <div class="row">
        <ul class="breadcrumb">
          <li><a href="{{url_for('bpRoot.view')}}">主面板</a> <span class="divider">\</span></li>
          <li class="active">调拨管理</li>
        </ul>
    </div>
    <div class="row">
        {{mymacros.render_search_form(form,3)}}
    </div>           
    <div class="row">
        <div class="btn-toolbar pull-right">
            <div class="btn-group"><button type="button" class="btn" onclick="$('form').submit()">{{BTN_SEARCH}}</button></div>
            {% if getAllPermission(['DN_CREATE',]) %}
                <div class="btn-group"><a href="{{url_for('.view',action='add')}}" class="btn btn-primary">创建调拨单</a></div>
            {% endif %}
            <div class="btn-group"><a href="{{url_for('.view',action='searchpdt')}}" class="btn">查找所有商品</a></div>
        </div>
    </div>     
    <div class="row">
        <table class="table table-bordered">
            <thead>
            <tr>
                <td class="span2">系统编号</td>
                <td>收货方</td>
                <td>送货单号</td>
                <td class="span1">状态</td>
                <td class="span2">经办人</td>
                <td class="span2">开单时间</td>
            </tr>
            </thead>
            <tbody>
                {% for r in result.items %}
                    <tr>
                        <td><a href="{{url_for('bpTns.view',action='view',id=r.id)}}">{{r.no}}</a></td>
                        <td>{{r.dShop}}</td>
                        <td>{{r.awb|f}}</td>
                        <td>{{r.status|ss(c='TNS')}}</td>
                        <td>{{r.createBy}}</td>
                        <td>{{r.createTime|fd}}</td>
                    </tr>
                {% endfor %}
        </table>
        {{mymacros.mypaginate(result)}}
    </div>

</div>
{% endblock %}